import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:guochaoapp/common/widges/appbar.dart';
import 'package:guochaoapp/controller/home/home_controller.dart';
import 'package:url_launcher/url_launcher.dart';

class GCKfPage extends StatelessWidget {


  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: Colors.white,
      appBar: GCAppBar(titleText: "客服服务"),
      body: _initSubviews(),
    );
  }

  _initSubviews() {
    GCHomeController home_controller = Get.find();

    return Center(child: Column(
      mainAxisAlignment: MainAxisAlignment.center,
      children: [
        Text(home_controller.telephone, style: TextStyle(color: Theme.of(Get.context).primaryColor, fontWeight: FontWeight.bold)),
        SizedBox(height: 10),
        RaisedButton(
          color: Theme.of(Get.context).primaryColor,
          onPressed: () {
            launch("tel://" + home_controller.telephone);
          },
          child: Text("点击咨询", style: TextStyle(color: Colors.white)),
        ),
      ],
    ),);
  }
}
